package com.fs.service.impl;

import com.fs.mapper.StoMapper;
import com.fs.pojo.Inventory;
import com.fs.pojo.Sto;
import com.fs.pojo.StoTo;
import com.fs.service.StoService;
import com.fs.vo.Condition;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author python_boy
 * @fileName StoServiceImpl
 * @date 2024/10/22 16:40
 * @description
 **/
@Service
public class StoServiceImpl implements StoService {
    @Autowired
    private StoMapper stoMapper;

    /**
     * 查询所有采购订单信息
     * @return 采购订单信息列表
     */
    @Override
    public PageInfo<StoTo> selectAll(Condition<StoTo> condition) {
        PageHelper.startPage(condition.getPage(), condition.getCount());
        List<StoTo> stoTos = stoMapper.selectAll(condition.getSearch());
        return new PageInfo<>(stoTos);
    }



}
